home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 4.6 KB | 174 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 1 $
- //
- // Author: Henri Lamiraux
- // Modified by: M.Boetcher to accept Dropped and Pasted sounds
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // ----- Framework Layer -----
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- #ifndef FWFRAME_H
- #include "FWFrame.h"
- #endif
-
- #ifndef FWDRGDRP_H
- #include "FWDrgDrp.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRECEVR_H
- #include "FWRecevr.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CNotification;
- class FW_CButton;
-
- class CAction;
- class CButtonContent;
-
- //========================================================================================
- // class CButtonPart
- //========================================================================================
-
- class CButtonPart : public FW_CPart
- {
- public:
-
- FW_DECLARE_AUTO(CButtonPart)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CButtonPart(ODPart* odPart);
- virtual ~CButtonPart();
-
- virtual void Initialize(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_CFrame* NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage);
-
- virtual void ClearPartStorage(Environment* ev, ODStorageUnit* storageUnit);
- virtual FW_Boolean IsValidContentValue(Environment* ev, ODType type);
-
- virtual FW_CContent* NewPartContent(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void DoAction();
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CButtonContent* fButtonContent;
- };
-
- //========================================================================================
- // class CButtonFrame
- //========================================================================================
-
- class CButtonFrame : public FW_CFrame, public FW_MReceiver, FW_MDroppableFrame
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CButtonFrame)
-
- CButtonFrame(Environment* ev,
- ODFrame* frame,
- FW_CPresentation* presentation,
- CButtonPart* part,
- FW_ResourceId id);
- virtual ~CButtonFrame();
-
- //----------------------------------------------------------------------------------------
- // FW_CFrame overrides
- //
- public:
- FW_CDropCommand* NewDropCommand(Environment *ev,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* facet,
- const FW_CPoint& dropPoint);
-
- virtual ODDragResult CanAcceptDrop(Environment* ev,
- ODDragItemIterator* dragInfo);
-
- virtual void Draw(Environment* ev,
- ODFacet* facet,
- ODShape* invalidShape);
-
- virtual ODFocusSet* GetFocusSet(Environment* ev) const;
- virtual void PostCreateViewFromStream(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // FW_MReceiver overrides
- //
- public:
- virtual void HandleNotification(Environment* ev, const FW_CNotification& notification);
-
- //----------------------------------------------------------------------------------------
- // new API
- //
- public:
- void SetFocusSet(Environment* ev, FW_Boolean optionPressed);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CButtonPart* fButtonPart;
- ODFocusSet* fFullFocusSet;
- ODFocusSet* fEmptyFocusSet;
- ODFocusSet* fFocusSet;
- };
-
- //========================================================================================
- // class COptionBehavior
- //========================================================================================
-
- class COptionBehavior : public FW_MEventHandler
- {
- public:
- FW_DECLARE_AUTO(COptionBehavior)
-
- COptionBehavior(Environment* ev, CButtonFrame* frame);
- virtual ~COptionBehavior();
-
- public:
- virtual FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- private:
- CButtonFrame* fFrame;
- };
-
- #endif
-